package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLString;
import HLLib.purchase.HLTapjoy;

public class HLClassTapjoy extends HLLibClass {
    public HLClassTapjoy(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLTapjoy();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            ((HLTapjoy) self).ShowOffers();
            break;
        }
        case 1: {
            ((HLTapjoy) self).GetPoints();
            break;
        }
        case 2: {
            ((HLTapjoy) self).Exit();
            break;
        }
        case 3: {
            ((HLTapjoy) self).SetUserID((HLString)args.GetObject(0));
            break;
        }
        }
    }

    public void StaticExecute(int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            if (resultOwnerObject == null) {
                HLTapjoy.ShareTapjoy();
            } else {
                resultOwnerObject.SetObject(resultIndex, HLTapjoy.ShareTapjoy());
            }
            break;
        }
        case 1: {
            HLTapjoy.Dispose();
            break;
        }
        }
    }
}
